﻿using HongStone.Service;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HongStone.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class EquipmentController : ControllerBase
    {
        private readonly EquipmentBll _equipmentBll;
        public EquipmentController(EquipmentBll equipmentBll)
        {
            _equipmentBll = equipmentBll;
        }
        /// <summary>
        /// 绑定楼层
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult BindHome(int id)
        {
            return Ok(_equipmentBll.BindHome(id));
        }
        /// <summary>
        /// 显示消防风机
        /// </summary>
        /// <param name="louid"></param>
        /// <param name="danid"></param>
        /// <param name="cengid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowFireFan(int louid, int danid, int cengid, int state, string homenumber)
        {
            return Ok(_equipmentBll.ShowFireFan(louid, danid, cengid, state,homenumber));
        }
    }
}
